package com.example.POJO;

import java.util.Arrays;

public class Product {
    private Integer id;

    private String name;

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    //商品种类
    private String kind;

    //商品标签
    private String tag;

    //商品描述
    private String description;

    //商品情况
    /**
     * TODO status ==0 -> 正常 status == 1 ->停售
     */
    private Integer status;


    //售出
    private Integer saled;

    //价格
    private float price;

    //折扣
    private float discount;

    public void setPhoto(byte[] photo) {
        this.photo = photo;
    }

    public byte[] getPhoto() {
        return photo;
    }

    //商品图片 字节数组的字符串形式
    private byte[] photo;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    public Integer getSaled() {
        return saled;
    }

    public void setSaled(Integer saled) {
        this.saled = saled;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public float getDiscount() {
        return discount;
    }

    public void setDiscount(float discount) {
        this.discount = discount;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", kind='" + kind + '\'' +
                ", tag='" + tag + '\'' +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", saled=" + saled +
                ", price=" + price +
                ", discount=" + discount +
                ", photo=" + Arrays.toString(photo) +
                '}';
    }
}
